# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Bjoern Schilberg <bjoern@intevation.de>
pkgname=readosm
pkgver=1.1.0
pkgrel=2
pkgdesc="Library to extract valid data from an Open Street Map input file."
url="https://www.gaia-gis.it/fossil/readosm/index"
arch="all"
license="MPL-1.1 GPL-2.0-only LGPL-2.1-only"
depends_dev="expat-dev zlib-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev"
source="https://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--host=$CHOST \
		--build=$CBUILD \
		--prefix /usr
	make
}


check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/share/
}
sha512sums="
d3581f564c4461c6a1a3d5fd7d18a262c884b2ac935530064bfaebd6c05d692fb92cc600fb40e87e03f7160ebf0eeeb05f51a0e257935d056b233fe28fc01a11  readosm-1.1.0.tar.gz
"
